package com.tiger.life;

import android.content.Intent;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import android.view.Window;
import android.widget.ImageView;
import android.widget.TextView;
/**
 * 结束后的温馨提示
 * @author tiger
 * 2011-6-4 下午09:40:30
 */
public class OverActivity extends BaseActivity {
	private Bundle bundle;
	private int checkFlag;
	private TextView overText,overTitle;
	private ImageView overImg;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.requestWindowFeature(Window.FEATURE_NO_TITLE);
        bundle=this.getIntent().getExtras();
        checkFlag=bundle.getInt(CommonUtil.checkFlag);
        
        if (checkFlag == CommonUtil.checkFlagValue.chest_Flag){
        	 setContentView(R.layout.chest_over);
        }else{
        	 setContentView(R.layout.over);
        }
       
       
        initView();
        initAction();
    }
    public void initView(){
    	if (checkFlag != CommonUtil.checkFlagValue.chest_Flag){
    		overImg=(ImageView)this.findViewById(R.id.overImg);
        	overText=(TextView)this.findViewById(R.id.overText);
        	overTitle=(TextView)this.findViewById(R.id.overTitle);
    	}
    	if (checkFlag == CommonUtil.checkFlagValue.cigar_Flag) {
    		overTitle.setText(R.string.over_cigar_title);
    		overText.setText(R.string.over_cigar);
    		overImg.setVisibility(View.GONE);
    	} else if (checkFlag == CommonUtil.checkFlagValue.baby_Flag) {
    		overTitle.setText(R.string.over_baby_title);
    		overText.setText(R.string.over_baby);
    		overImg.setVisibility(View.VISIBLE);
    		overImg.setBackgroundResource(R.drawable.over_baby);
    	} else if (checkFlag == CommonUtil.checkFlagValue.weight_Flag) {
    		overTitle.setText(R.string.over_weight_title);
    		overText.setText(R.string.over_weight);
    		overImg.setVisibility(View.VISIBLE);
    		overImg.setBackgroundResource(R.drawable.over_weight);
    	} else if (checkFlag == CommonUtil.checkFlagValue.calorie_Flag) {

    	} else if (checkFlag == CommonUtil.checkFlagValue.chest_Flag) {

    	} else if (checkFlag == CommonUtil.checkFlagValue.xingzuo_Flag) {

		} else if (checkFlag == CommonUtil.checkFlagValue.eredar_Flag) {

		} else if (checkFlag == CommonUtil.checkFlagValue.rumor_Flag) {

		} else {
			setContentView(R.layout.dog_check);
		}
    }
    public void initAction(){
    	
    }
   
}